package com.tkp.controller;

import com.tkp.entity.ToKenDTO;
import com.tkp.token.service.CallbackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

/**
 * @Author: duk
 * @Date: 2021/11/3 10:08
 * @Description: 生成ToKen
 */
@RestController
@Api("toKen获取接口")
@RequestMapping("api/token")
public class QueryTokenController {
    @Resource
    CallbackService callbackService;

    /**
     * 获取token
     * @return token信息
     */
    @ApiOperation("获取toKen")
    @GetMapping(value = "/callback")
    public ToKenDTO queryToken(String clientId) {
        return callbackService.queryToken(clientId);
    }
}
